package vsa.migrations.junit.migrators;

import org.emftext.language.java.classifiers.Class;
import org.emftext.language.java.containers.CompilationUnit;

import vsa.migrations.junit.JunitMigrationException;

/**
 * defines a simple junit migration step
 * @author oleym
 *
 */
public interface JunitMigrator {

	final static String METHODENAME_SETUP ="setUp";

	final static String METHODENAME_TEARDOWN ="tearDown";


	/**
	 * cleanups the migrated classes
	 * - removes old imports
	 * - removes direct superclass-reference
	 * @param compilationunit
	 * @param clazz
	 * @throws JunitMigrationException
	 */
	public void cleanupTestCase(CompilationUnit compilationunit, Class clazz) throws JunitMigrationException;


	/**
	 * migrates one testcase
	 * @param compilationunit compilationunit
	 * @param clazz clazz itself
	 * @throws JunitMigrationException exception if error while migration is thrown
	 */
	public void migrateTestCase(CompilationUnit compilationunit, Class clazz) throws JunitMigrationException;

}
